<template>
  <div>
    <div v-for="(item,index) in categoryList" :key="index">
      <div class="item">
        {{item.title}}
      </div>
      <div v-if="item.children" class="item-child">
        <detail-list :categoryList="item.children"></detail-list>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  name: 'DetailList',
  props: {
    categoryList: Array
  },
  data () {
    return {}
  }
}
</script>

<style lang="stylus" scoped>
  .item
    font-size .28rem
    padding .08rem .2rem
  .item-child
    padding .08rem .2rem
</style>
